function [Stat]=SubFun_Stat_WealthIncome(PP,SS)

%% QW
QW              =   SS.TrProb.UnitTrMat.ReEval*SS.Dist_fz.QW_fz;
QW_V            =   (1-PP.XI)*QW;
QW_Vhat         =   PP.XI*QW;

Dist            =   full([QW_V;QW_Vhat]);
%% QQ
ID              =   SS.DistApp.fz.State(:,2);
ID_z            =   SS.FunApp.ExoState.State(ID,1);

z               =   PP.ExoState.IdioInc.Node(ID_z);

w               =   SS.w;
% Income
Income          =   [SS.DistPolicy.V.zl.*w;SS.DistPolicy.Vhat.zl.*w];
% Wealth
Wealth          =   [SS.DistPolicy.V.fp;SS.DistPolicy.Vhat.fp];
% Wealth-Income
Wealth_Income   =   Wealth./Income;
WI_NonNaN_Idx   =   isfinite(Wealth_Income);
%% Statistics
QuantList       =   [0.01;0.05;0.10;0.25;0.50;0.75;0.90;0.95;0.99];

% Wealth
[Gini_Wealth,TopShare_Wealth] =   DistApp_Hist_InequalityMeasure(Wealth,Dist,QuantList);

Share_Neg       =   sum(Dist(Wealth<=-1e-3));
Share_Zero      =   sum(Dist( (Wealth>-1e-3) & (Wealth<1e-3) ));

Median          =   DistApp_Hist_Quantile(Wealth,Dist,[0.5]);
Avg             =   Wealth'*Dist;

Stat_Wealth     =   struct('Avg',Avg,'Median',Median,...
                           'Gini',Gini_Wealth,'TopShare',TopShare_Wealth,...
                           'Frac_Neg',Share_Neg,'Frac_Zero',Share_Zero);
% Income
[Gini_Income,TopShare_Income] =   DistApp_Hist_InequalityMeasure(Income,Dist,QuantList);

Share_Neg       =   sum(Dist(Income<=-1e-3));
Share_Zero      =   sum(Dist( (Income>-1e-3) & (Income<1e-3) ));

Median          =   DistApp_Hist_Quantile(Income,Dist,[0.5]);
Avg             =   Income'*Dist;

Stat_Income     =   struct('Avg',Avg,'Median',Median,...
                           'Gini',Gini_Income,'TopShare',TopShare_Income,...
                           'Frac_Neg',Share_Neg,'Frac_Zero',Share_Zero);
% Wealth-Income Ratio
Quant           =   DistApp_Hist_Quantile(Wealth_Income(WI_NonNaN_Idx),Dist(WI_NonNaN_Idx),QuantList);

Share_HtM       =   sum(Dist(Wealth_Income<1/3/2));

Median          =   DistApp_Hist_Quantile(Wealth_Income(WI_NonNaN_Idx),Dist(WI_NonNaN_Idx),[0.5]);
Avg             =   Wealth_Income(WI_NonNaN_Idx)'*Dist(WI_NonNaN_Idx);

Stat_WI         =   struct('Avg',Avg,'Median',Median,...
                           'Quant',Quant,'Share_HtM',Share_HtM);

Stat            =   struct('QuantList',QuantList,...
                           'Wealth',Stat_Wealth,'Income',Stat_Income,...
                           'WealthIncomeRatio',Stat_WI);